package xu.scala

import org.apache.spark.{SparkConf, SparkContext}

object PopTeaCount {
  def main(args: Array[String]): Unit = {
    val conf = new SparkConf().setMaster("local[*]").setAppName("FileRdd_2")
    val sc = new SparkContext(conf)
    sc.setLogLevel("ERROR")
    val rdd = sc.textFile("E:\\scala\\res\\teacher.log")
    rdd.map(_.split("/").last).map((_,1)).reduceByKey(_+_).foreach(println(_))
  }
}
